package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.models.auth.In;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@TableName("item_label")
public class ItemLabelEntity {
    //主键Id
    @TableId(value = "item_label_id",type = IdType.AUTO)
    private Integer itemLabelId;
    //父级Id
    private Integer itemLabelParentId;
    //项目标签名称
    private String itemLabelName;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    //修改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    //逻辑删除（0=>显示 1=>隐藏）
    private Integer delFlag;

    @JsonInclude(JsonInclude.Include.NON_EMPTY) //返回不为空的数据
    @TableField(exist = false)
    private List<ItemLabelEntity> children = new ArrayList<>();

}
